//
//  YIem_SYTabBarButton.m
//  B段_开眼
//
//  Created by YIem on 16/5/4.
//  Copyright © 2016年 Howie. All rights reserved.
//

#import "YIem_SYTabBarButton.h"
#import "YIem_UIView+SYCategory.h"
@implementation YIem_SYTabBarButton

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        //设置按钮的统一背景颜色
        [self setBackgroundImage:[UIImage imageNamed:@"tabbar_separate_selected_bg"] forState:UIControlStateDisabled];
        
        //设置图像模式 －－－> 居中
         self.imageView.contentMode = UIViewContentModeCenter;
        //取消失效状态的按钮图像调整
        self.adjustsImageWhenDisabled = NO;
        //取消高亮状态的按钮图像调整
        self.adjustsImageWhenHighlighted = NO;
    }
    return self;
}
- (void)layoutSubviews {
    [ super layoutSubviews];
    self.imageView.width = self.width;
    self.imageView.height = self.imageView.width;
    self.imageView.x = 0;
    self.imageView.y = 0;
    
    self.titleLabel.hidden = YES;
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
